package com.aracky.flowable.service;

import com.aracky.common.vo.PageVO;
import com.aracky.flowable.model.dto.DeploymentDTO;
import com.aracky.flowable.model.request.DeploymentRequest;
import com.aracky.flowable.model.vo.ProcessDefinitionVO;
import org.flowable.engine.repository.ProcessDefinition;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


public interface DeployMentService {

    /**
     * 通过byte数据部署
     * @param file
     * @param deployName
     * @return
     */
    String createByteDeployMent(MultipartFile file, String deployName);


    /**
     * 流程部署
     *
     * @param dto 流程部署对象
     * @return
     */
    String createDeployment(DeploymentDTO dto);

    /**
     * 流程部署 列表
     *
     * @param deploymentRequest
     * @return
     */
    PageVO<ProcessDefinitionVO> getProcessDefinitionList(DeploymentRequest deploymentRequest);

    /**
     * 获取部署流程图
     */
    ResponseEntity<byte[]> getDeptloyImage(String deploymentId,String diagramResourceName);

}
